require 'digit2word/dict'
require 'digit2word/convert'

HELP_MESSAGE = <<-EOT
Usage:
    digit2word -h/--help
    digit2word -v/--version
    digit2word -d [new dictionary path]    Set a new dictionary
    digit2word file1 file2 ...             Files with phone number
EOT

case ARGV.first
when '-h', '--help'    then
  puts HELP_MESSAGE
when '-v', '--version' then
  puts Digit2word::VERSION
when '-d'              then
  ARGV.shift
  Digit2word::Dict.new(ARGV).run!
else
  Digit2word::Convert.new(ARGV).run!
end
